<div class="widgets">

  <div class="row">
    <div class="col-xs-12">
      <ba-card baCardClass="with-scroll">
        <div class="section">
          <form (ngSubmit)="search()" class="form-horizontal">
            <div class="form-group row">

              <div class="col-sm-5">
                <label for="idcard" class="col-sm-5 control-label">身&nbsp;&nbsp;份&nbsp;&nbsp;证</label>
                <div class="col-sm-7">
                  <input [(ngModel)]="searchForm.idcard" name="idcard" type="text" class="form-control">
                </div>
              </div>

              <div class="col-sm-5">
                <label for="name" class="col-sm-5 control-label">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</label>
                <div class="col-sm-7">
                  <input [(ngModel)]="searchForm.name" name="name" type="text" class="form-control">
                </div>
              </div>

            </div>

            <div class="form-group row">

              <div class="col-sm-5">
                <label for="type" class="col-sm-5 control-label">证书类型</label>
                <div class="col-sm-7">
                  <select [(ngModel)]="searchForm.type" name="type" type="text" class="form-control">
                    <option value="" selected>全部</option>
                    <option value="质量员">质量员</option>
                    <option value="施工员">施工员</option>
                  </select>
                </div>
              </div>

              <div class="col-sm-5">
                <label for="companyname" class="col-sm-5 control-label">公&nbsp;&nbsp;司&nbsp;&nbsp;名</label>
                <div class="col-sm-7">
                  <input [(ngModel)]="searchForm.companyname" name="companyname" type="text" class="form-control">
                </div>
              </div>
              <div class="col-sm-2">
                <button type="submit" class="btn btn-primary pull-left">
                  <i class="fa fa-search" aria-hidden="true"></i> 查询</button>
              </div>
            </div>
          </form>
        </div>

        <div class="section" role="toolbar">
          <div class="btn-section btn-toolbar">
            <div class="btn-group" role="group">
              <a role="button" class="btn btn-primary btn-review" [ngClass]="{'disabled': disablePublishBtn}"
                 (click)="subSelected()">公示所选</a>
            </div>
            <div class="btn-group" role="group">
              <a role="button" class="btn btn-success btn-pass"
                 (click)="subAll()">公示所有</a>
            </div>
          </div>
          <div>
            <label for="starttime" style="margin-left: 10px;">开始时间</label>
            <input datePicker id="starttime" type="text" readonly>
            <label for="endtime">结束时间</label>
            <input datePicker id="endtime" type="text" readonly>
          </div>
          <span *ngIf="_errorMsg">{{_errorMsg}}</span>
          <span *ngIf="errorShow">网络异常，请重新登录</span>
        </div>

        <div class="section">
          <data-tables [searchParams]="searchForm" [config]="dataTablesConfig"
                       (onSelect)="tableRowSelect($event)"  (onError)="handleError($event)"></data-tables>
        </div>
      </ba-card>
    </div>
  </div>
</div>
